Video recording/playback apparatuses such as a digital video camera have been examined. The video recording/playback apparatus records still and moving images on a large-capacity optical disk used as a recording medium instead of a DVD (Digital Versatile Disc). Next-generation optical disk standards include the adoption of a moving image compression encoding technique for higher compression ratios, in addition to increasing the recording capacity of media. One of these standards is H.264.
To increase the compression ratio, H.264 permits the use of many reference picture memories in inter picture prediction, compared to conventional techniques such as MPEG2. H.264 exhibits a high degree of freedom to rearrange decoded pictures.
For example, according to MPEG2, a P picture is always used as a reference picture, and no B picture can be used as a reference picture. An MPEG2 decoder can only check the picture type (I, P, or B) to determine whether a decoded picture needs to be saved in a reference picture memory. To the contrary, according to H.264, even a P picture may not be used as a reference picture, and even a B picture may be used as a reference picture.
The H.264 standards permit the use of a specific reference picture in decoding or encoding for a long period. According to MPEG2, a FIFO (First In First Out) is used as a reference picture memory, and pictures which can be referred to are limited. According to H.264, even a temporally distant picture, which cannot be referred to in MPEG2, can be used as a reference picture.
This H.264-based flexible inter picture prediction is important in increasing the encoding efficiency. To implement this function, however, the reference picture memory must store a larger number of reference pictures in H.264 than in MPEG2. Rearranging so many reference pictures requires a larger memory capacity and more calculation.
To solve this problem, there is proposed an arrangement which decreases the number of images to be stored in a reference picture memory by controlling the reference relationship (see Japanese Patent Laid-Open No. 2005-260588).
A picture referred to for a long period, i.e., a so-called long-term reference picture in H.264 is advantageous to compression-encoding a substantially motionless scene when taking a picture of a landscape or the like. However, the long-term reference picture is not suited to a digital video camera which encodes an actively moving object in real time when taking a picture of an athletic meeting or the like. Even the method disclosed in Japanese Patent Laid-Open No. 2005-260588 is considered to be unsuitable to compression-encode a picture of an actively moving object in an athletic meeting or the like. When a digital video camera uses a B picture as a reference picture, the reference relationship becomes complicated, and arithmetic processing becomes heavy, increasing battery consumption.
Hence, it is effective to impose some restrictions in encoding on the use of functions permitted by the profile of the H.264 standards. For example, an H.264 CODEC used in a consumer digital video camera or the like to perform real-time encoding does not use a long-term reference picture, or does not use a B picture as a reference picture. This can reduce the memory capacity, operation load, and hardware cost, and prolong the service life of the battery.
In decoding by a small-size CODEC, a stream recorded by its own device can be played back without any error. When, however, an H.264 bit stream generated by another device with a complicated reference relationship is input, decoding may fail owing to a shortage of the reference picture storage buffer, or the like.